package cn.yunyichina.provider.framework.dubbo.service;

import com.alibaba.fastjson.JSONObject;

import cn.yunyichina.provider.framework.data.SpringContextHandler;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.iface.entity.common.ResponseObject;
import cn.yunyichina.provider.iface.service.IMessage;
import cn.yunyichina.utils.convert.JsonUtils;

public class MessageService {

    static final String serviceName = "messageService";

    static IMessage messageService = null;

    static {
        messageService = (IMessage) SpringContextHandler.getBean(serviceName);
    }
    
    public static IMessage getMessageClient(){
    	return messageService;
    }

    public static Response callUnderlineFromInternal(String method, String data) {
        return messageService.callUnderlineFromInternal("", method, data, (short) 0);
    }

    public static Response callUnderlineFromInternal(String sessionId, String method, String data) {
        return messageService.callUnderlineFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String sessionId, String method, String data) {
        return messageService.callHumpFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String method, String data) {
        return messageService.callHumpFromInternal("", method, data, (short) 0);
    }
    /**
     * 
     * @param smsType
     * @param strJsonMsgContent Map结构
     * @return
     */
    public static ResponseObject sendSms(String strJson) {
        return messageService.sendSms(strJson);
    }

    /**
     * 发送医疗挂号通知
     * @param strJson
     * @return
     */
    public String sendMsgRegNotify(String strJson){
        return messageService.sendMsgRegNotify(strJson);
    }
}
